<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="/WEB-INF/tag/c.tld"%>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>代码生成器</title>
	<%@ include file="include/style.jsp"%>
	<%@ include file="include/js.jsp"%>
	<script type="text/javascript" src="${webRoot}/assets/jforest/js/jforest-timer.js"></script>
</head>
<body>
	<div class="container">
		<div class="panel panel-default">
			<div class="panel-body" id="divBuildInfo">
				<a href="${projectZipPath}" id="zipLink">${projectZipPath}</a>
			</div>
		</div>
	</div>
<script type="text/javascript">
$(function(){
	$('#divBuildInfo').jfTimer({
		intervalTime:100,
		callback:function(){
			var timer = this;
			$.get('${webRoot}/project/buildInfo',{
				code:'${project.projectCode}'
			},function(result){
				if(result.error == 1){
					if(result.data){
						$('#divBuildInfo').append('<p><b>'+result.data.msg+'</b></p>');
						if(result.data.success == true){
							$('#divBuildInfo').append('<p>'+result.data.realPath+'</p>');
						}
					}
				}else if(result.error == 2){
					timer.close();
					$('#divBuildInfo').append('<p><a href="${webRoot}'+result.data+'">'+result.data+'</a></p>');
				}else if(result.error == 3){
					
				}else{
					timer.close();
					alert(result.msg);
				}
			});
		}
	});
});
</script>
</body>
</html>